/**
 * 合同管理APi
 */
import request from '/@/utils/request';

export function readAllContract(params: any) {
  return request({
    url: 'contracts',
    method: 'get',
    params,
  });
}

export function createContract(data: any) {
  return request({
    url: 'contracts',
    method: 'post',
    data,
  });
}

export function updateContract(id: string, data: any) {
  return request({
    url: `contracts/${id}`,
    method: 'patch',
    data,
  });
}

export function deleteContract(id: string) {
  return request({
    url: `contracts/${id}`,
    method: 'delete',
  });
}
